.class public Lcom/zuimeia/ui/rippleview/RippleView;
.super Landroid/widget/RelativeLayout;
.source "RippleView.java"


# instance fields
.field private DURATION:I

.field private FRAME_RATE:I

.field private HEIGHT:I

.field private PAINT_ALPHA:I

.field private WIDTH:I

.field private animationRunning:Z

.field private canvasHandler:Landroid/os/Handler;

.field private childView:Landroid/view/View;

.field private durationEmpty:I

.field private gestureDetector:Landroid/view/GestureDetector;

.field private hasToZoom:Ljava/lang/Boolean;

.field private isCentered:Ljava/lang/Boolean;

.field private originBitmap:Landroid/graphics/Bitmap;

.field private paint:Landroid/graphics/Paint;

.field private radiusMax:F

.field private rippleColor:I

.field private ripplePadding:I

.field private rippleType:Ljava/lang/Integer;

.field private runnable:Ljava/lang/Runnable;

.field private scaleAnimation:Landroid/view/animation/ScaleAnimation;

.field private timer:I

.field private timerEmpty:I

.field private x:F

.field private y:F

.field private zoomDuration:I

.field private zoomScale:F


# direct methods
.method public constructor <init>(Landroid/content/Context;)V
    .registers 5
    .param p1, "context"    # Landroid/content/Context;

    .prologue
    const/high16 v2, -0x40800000

    const/4 v1, 0x0

    .line 87
    invoke-direct {p0, p1}, Landroid/widget/RelativeLayout;-><init>(Landroid/content/Context;)V

    .line 56
    const/16 v0, 0xa

    iput v0, p0, Lcom/zuimeia/ui/rippleview/RippleView;->FRAME_RATE:I

    .line 57
    const/16 v0, 0x190

    iput v0, p0, Lcom/zuimeia/ui/rippleview/RippleView;->DURATION:I

    .line 58
    const/16 v0, 0x5a

    iput v0, p0, Lcom/zuimeia/ui/rippleview/RippleView;->PAINT_ALPHA:I

    .line 60
    const/4 v0, 0x0

    iput v0, p0, Lcom/zuimeia/ui/rippleview/RippleView;->radiusMax:F

    .line 61
    iput-boolean v1, p0, Lcom/zuimeia/ui/rippleview/RippleView;->animationRunning:Z

    .line 62
    iput v1, p0, Lcom/zuimeia/ui/rippleview/RippleView;->timer:I

    .line 63
    iput v1, p0, Lcom/zuimeia/ui/rippleview/RippleView;->timerEmpty:I

    .line 64
    const/4 v0, -0x1

    iput v0, p0, Lcom/zuimeia/ui/rippleview/RippleView;->durationEmpty:I

    .line 65
    iput v2, p0, Lcom/zuimeia/ui/rippleview/RippleView;->x:F

    .line 66
    iput v2, p0, Lcom/zuimeia/ui/rippleview/RippleView;->y:F

    .line 79
    new-instance v0, Lcom/zuimeia/ui/rippleview/RippleView$1;

    invoke-direct {v0, p0}, Lcom/zuimeia/ui/rippleview/RippleView$1;-><init>(Lcom/zuimeia/ui/rippleview/RippleView;)V

    iput-object v0, p0, Lcom/zuimeia/ui/rippleview/RippleView;->runnable:Ljava/lang/Runnable;

    .line 88
    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
    .registers 6
    .param p1, "context"    # Landroid/content/Context;
    .param p2, "attrs"    # Landroid/util/AttributeSet;

    .prologue
    const/high16 v2, -0x40800000

    const/4 v1, 0x0

    .line 91
    invoke-direct {p0, p1, p2}, Landroid/widget/RelativeLayout;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V

    .line 56
    const/16 v0, 0xa

    iput v0, p0, Lcom/zuimeia/ui/rippleview/RippleView;->FRAME_RATE:I

    .line 57
    const/16 v0, 0x190

    iput v0, p0, Lcom/zuimeia/ui/rippleview/RippleView;->DURATION:I

    .line 58
    const/16 v0, 0x5a

    iput v0, p0, Lcom/zuimeia/ui/rippleview/RippleView;->PAINT_ALPHA:I

    .line 60
    const/4 v0, 0x0

    iput v0, p0, Lcom/zuimeia/ui/rippleview/RippleView;->radiusMax:F

    .line 61
    iput-boolean v1, p0, Lcom/zuimeia/ui/rippleview/RippleView;->animationRunning:Z

    .line 62
    iput v1, p0, Lcom/zuimeia/ui/rippleview/RippleView;->timer:I

    .line 63
    iput v1, p0, Lcom/zuimeia/ui/rippleview/RippleView;->timerEmpty:I

    .line 64
    const/4 v0, -0x1

    iput v0, p0, Lcom/zuimeia/ui/rippleview/RippleView;->durationEmpty:I

    .line 65
    iput v2, p0, Lcom/zuimeia/ui/rippleview/RippleView;->x:F

    .line 66
    iput v2, p0, Lcom/zuimeia/ui/rippleview/RippleView;->y:F

    .line 79
    new-instance v0, Lcom/zuimeia/ui/rippleview/RippleView$1;

    invoke-direct {v0, p0}, Lcom/zuimeia/ui/rippleview/RippleView$1;-><init>(Lcom/zuimeia/ui/rippleview/RippleView;)V

    iput-object v0, p0, Lcom/zuimeia/ui/rippleview/RippleView;->runnable:Ljava/lang/Runnable;

    .line 92
    invoke-direct {p0, p1, p2}, Lcom/zuimeia/ui/rippleview/RippleView;->init(Landroid/content/Context;Landroid/util/AttributeSet;)V

    .line 93
    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
    .registers 7
    .param p1, "context"    # Landroid/content/Context;
    .param p2, "attrs"    # Landroid/util/AttributeSet;
    .param p3, "defStyle"    # I

    .prologue
    const/high16 v2, -0x40800000

    const/4 v1, 0x0

    .line 96
    invoke-direct {p0, p1, p2, p3}, Landroid/widget/RelativeLayout;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V

    .line 56
    const/16 v0, 0xa

    iput v0, p0, Lcom/zuimeia/ui/rippleview/RippleView;->FRAME_RATE:I

    .line 57
    const/16 v0, 0x190

    iput v0, p0, Lcom/zuimeia/ui/rippleview/RippleView;->DURATION:I

    .line 58
    const/16 v0, 0x5a

    iput v0, p0, Lcom/zuimeia/ui/rippleview/RippleView;->PAINT_ALPHA:I

    .line 60
    const/4 v0, 0x0

    iput v0, p0, Lcom/zuimeia/ui/rippleview/RippleView;->radiusMax:F

    .line 61
    iput-boolean v1, p0, Lcom/zuimeia/ui/rippleview/RippleView;->animationRunning:Z

    .line 62
    iput v1, p0, Lcom/zuimeia/ui/rippleview/RippleView;->timer:I

    .line 63
    iput v1, p0, Lcom/zuimeia/ui/rippleview/RippleView;->timerEmpty:I

    .line 64
    const/4 v0, -0x1

    iput v0, p0, Lcom/zuimeia/ui/rippleview/RippleView;->durationEmpty:I

    .line 65
    iput v2, p0, Lcom/zuimeia/ui/rippleview/RippleView;->x:F

    .line 66
    iput v2, p0, Lcom/zuimeia/ui/rippleview/RippleView;->y:F

    .line 79
    new-instance v0, Lcom/zuimeia/ui/rippleview/RippleView$1;

    invoke-direct {v0, p0}, Lcom/zuimeia/ui/rippleview/RippleView$1;-><init>(Lcom/zuimeia/ui/rippleview/RippleView;)V

    iput-object v0, p0, Lcom/zuimeia/ui/rippleview/RippleView;->runnable:Ljava/lang/Runnable;

    .line 97
    invoke-direct {p0, p1, p2}, Lcom/zuimeia/ui/rippleview/RippleView;->init(Landroid/content/Context;Landroid/util/AttributeSet;)V

    .line 98
    return-void
.end method

.method private getCircleBitmap(I)Landroid/graphics/Bitmap;
    .registers 12
    .param p1, "radius"    # I

    .prologue
    const/4 v9, 0x0

    .line 243
    iget-object v4, p0, Lcom/zuimeia/ui/rippleview/RippleView;->originBitmap:Landroid/graphics/Bitmap;

    invoke-virtual {v4}, Landroid/graphics/Bitmap;->getWidth()I

    move-result v4

    iget-object v5, p0, Lcom/zuimeia/ui/rippleview/RippleView;->originBitmap:Landroid/graphics/Bitmap;

    invoke-virtual {v5}, Landroid/graphics/Bitmap;->getHeight()I

    move-result v5

    sget-object v6, Landroid/graphics/Bitmap$Config;->ARGB_8888:Landroid/graphics/Bitmap$Config;

    invoke-static {v4, v5, v6}, Landroid/graphics/Bitmap;->createBitmap(IILandroid/graphics/Bitmap$Config;)Landroid/graphics/Bitmap;

    move-result-object v1

    .line 244
    .local v1, "output":Landroid/graphics/Bitmap;
    new-instance v0, Landroid/graphics/Canvas;

    invoke-direct {v0, v1}, Landroid/graphics/Canvas;-><init>(Landroid/graphics/Bitmap;)V

    .line 245
    .local v0, "canvas":Landroid/graphics/Canvas;
    new-instance v2, Landroid/graphics/Paint;

    invoke-direct {v2}, Landroid/graphics/Paint;-><init>()V

    .line 246
    .local v2, "paint":Landroid/graphics/Paint;
    new-instance v3, Landroid/graphics/Rect;

    iget v4, p0, Lcom/zuimeia/ui/rippleview/RippleView;->x:F

    int-to-float v5, p1

    sub-float/2addr v4, v5

    float-to-int v4, v4

    iget v5, p0, Lcom/zuimeia/ui/rippleview/RippleView;->y:F

    int-to-float v6, p1

    sub-float/2addr v5, v6

    float-to-int v5, v5

    iget v6, p0, Lcom/zuimeia/ui/rippleview/RippleView;->x:F

    int-to-float v7, p1

    add-float/2addr v6, v7

    float-to-int v6, v6

    iget v7, p0, Lcom/zuimeia/ui/rippleview/RippleView;->y:F

    int-to-float v8, p1

    add-float/2addr v7, v8

    float-to-int v7, v7

    invoke-direct {v3, v4, v5, v6, v7}, Landroid/graphics/Rect;-><init>(IIII)V

    .line 248
    .local v3, "rect":Landroid/graphics/Rect;
    const/4 v4, 0x1

    invoke-virtual {v2, v4}, Landroid/graphics/Paint;->setAntiAlias(Z)V

    .line 249
    invoke-virtual {v0, v9, v9, v9, v9}, Landroid/graphics/Canvas;->drawARGB(IIII)V

    .line 250
    iget v4, p0, Lcom/zuimeia/ui/rippleview/RippleView;->x:F

    iget v5, p0, Lcom/zuimeia/ui/rippleview/RippleView;->y:F

    int-to-float v6, p1

    invoke-virtual {v0, v4, v5, v6, v2}, Landroid/graphics/Canvas;->drawCircle(FFFLandroid/graphics/Paint;)V

    .line 252
    new-instance v4, Landroid/graphics/PorterDuffXfermode;

    sget-object v5, Landroid/graphics/PorterDuff$Mode;->SRC_IN:Landroid/graphics/PorterDuff$Mode;

    invoke-direct {v4, v5}, Landroid/graphics/PorterDuffXfermode;-><init>(Landroid/graphics/PorterDuff$Mode;)V

    invoke-virtual {v2, v4}, Landroid/graphics/Paint;->setXfermode(Landroid/graphics/Xfermode;)Landroid/graphics/Xfermode;

    .line 253
    iget-object v4, p0, Lcom/zuimeia/ui/rippleview/RippleView;->originBitmap:Landroid/graphics/Bitmap;

    invoke-virtual {v0, v4, v3, v3, v2}, Landroid/graphics/Canvas;->drawBitmap(Landroid/graphics/Bitmap;Landroid/graphics/Rect;Landroid/graphics/Rect;Landroid/graphics/Paint;)V

    .line 255
    return-object v1
.end method

.method private init(Landroid/content/Context;Landroid/util/AttributeSet;)V
    .registers 8
    .param p1, "context"    # Landroid/content/Context;
    .param p2, "attrs"    # Landroid/util/AttributeSet;

    .prologue
    const/4 v4, 0x1

    const/4 v3, 0x0

    .line 101
    invoke-virtual {p0}, Lcom/zuimeia/ui/rippleview/RippleView;->isInEditMode()Z

    move-result v1

    if-eqz v1, :cond_9

    .line 136
    :goto_8
    return-void

    .line 104
    :cond_9
    sget-object v1, Lcom/zuimeia/ui/R$styleable;->RippleView:[I

    invoke-virtual {p1, p2, v1}, Landroid/content/Context;->obtainStyledAttributes(Landroid/util/AttributeSet;[I)Landroid/content/res/TypedArray;

    move-result-object v0

    .line 105
    .local v0, "typedArray":Landroid/content/res/TypedArray;
    sget v1, Lcom/zuimeia/ui/R$styleable;->RippleView_rv_color:I

    const/4 v2, -0x1

    invoke-virtual {v0, v1, v2}, Landroid/content/res/TypedArray;->getColor(II)I

    move-result v1

    iput v1, p0, Lcom/zuimeia/ui/rippleview/RippleView;->rippleColor:I

    .line 106
    sget v1, Lcom/zuimeia/ui/R$styleable;->RippleView_rv_type:I

    invoke-virtual {v0, v1, v3}, Landroid/content/res/TypedArray;->getInt(II)I

    move-result v1

    invoke-static {v1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v1

    iput-object v1, p0, Lcom/zuimeia/ui/rippleview/RippleView;->rippleType:Ljava/lang/Integer;

    .line 107
    sget v1, Lcom/zuimeia/ui/R$styleable;->RippleView_rv_zoom:I

    invoke-virtual {v0, v1, v3}, Landroid/content/res/TypedArray;->getBoolean(IZ)Z

    move-result v1

    invoke-static {v1}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;

    move-result-object v1

    iput-object v1, p0, Lcom/zuimeia/ui/rippleview/RippleView;->hasToZoom:Ljava/lang/Boolean;

    .line 108
    sget v1, Lcom/zuimeia/ui/R$styleable;->RippleView_rv_centered:I

    invoke-virtual {v0, v1, v3}, Landroid/content/res/TypedArray;->getBoolean(IZ)Z

    move-result v1

    invoke-static {v1}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;

    move-result-object v1

    iput-object v1, p0, Lcom/zuimeia/ui/rippleview/RippleView;->isCentered:Ljava/lang/Boolean;

    .line 109
    sget v1, Lcom/zuimeia/ui/R$styleable;->RippleView_rv_rippleDuration:I

    iget v2, p0, Lcom/zuimeia/ui/rippleview/RippleView;->DURATION:I

    invoke-virtual {v0, v1, v2}, Landroid/content/res/TypedArray;->getInteger(II)I

    move-result v1

    iput v1, p0, Lcom/zuimeia/ui/rippleview/RippleView;->DURATION:I

    .line 110
    sget v1, Lcom/zuimeia/ui/R$styleable;->RippleView_rv_framerate:I

    iget v2, p0, Lcom/zuimeia/ui/rippleview/RippleView;->FRAME_RATE:I

    invoke-virtual {v0, v1, v2}, Landroid/content/res/TypedArray;->getInteger(II)I

    move-result v1

    iput v1, p0, Lcom/zuimeia/ui/rippleview/RippleView;->FRAME_RATE:I

    .line 111
    sget v1, Lcom/zuimeia/ui/R$styleable;->RippleView_rv_alpha:I

    iget v2, p0, Lcom/zuimeia/ui/rippleview/RippleView;->PAINT_ALPHA:I

    invoke-virtual {v0, v1, v2}, Landroid/content/res/TypedArray;->getInteger(II)I

    move-result v1

    iput v1, p0, Lcom/zuimeia/ui/rippleview/RippleView;->PAINT_ALPHA:I

    .line 112
    sget v1, Lcom/zuimeia/ui/R$styleable;->RippleView_rv_ripplePadding:I

    invoke-virtual {v0, v1, v3}, Landroid/content/res/TypedArray;->getDimensionPixelSize(II)I

    move-result v1

    iput v1, p0, Lcom/zuimeia/ui/rippleview/RippleView;->ripplePadding:I

    .line 113
    new-instance v1, Landroid/os/Handler;

    invoke-direct {v1}, Landroid/os/Handler;-><init>()V

    iput-object v1, p0, Lcom/zuimeia/ui/rippleview/RippleView;->canvasHandler:Landroid/os/Handler;

    .line 114
    sget v1, Lcom/zuimeia/ui/R$styleable;->RippleView_rv_zoomScale:I

    const v2, 0x3f83d70a

    invoke-virtual {v0, v1, v2}, Landroid/content/res/TypedArray;->getFloat(IF)F

    move-result v1

    iput v1, p0, Lcom/zuimeia/ui/rippleview/RippleView;->zoomScale:F

    .line 115
    sget v1, Lcom/zuimeia/ui/R$styleable;->RippleView_rv_zoomDuration:I

    const/16 v2, 0xc8

    invoke-virtual {v0, v1, v2}, Landroid/content/res/TypedArray;->getInt(II)I

    move-result v1

    iput v1, p0, Lcom/zuimeia/ui/rippleview/RippleView;->zoomDuration:I

    .line 116
    new-instance v1, Landroid/graphics/Paint;

    invoke-direct {v1}, Landroid/graphics/Paint;-><init>()V

    iput-object v1, p0, Lcom/zuimeia/ui/rippleview/RippleView;->paint:Landroid/graphics/Paint;

    .line 117
    iget-object v1, p0, Lcom/zuimeia/ui/rippleview/RippleView;->paint:Landroid/graphics/Paint;

    invoke-virtual {v1, v4}, Landroid/graphics/Paint;->setAntiAlias(Z)V

    .line 118
    iget-object v1, p0, Lcom/zuimeia/ui/rippleview/RippleView;->paint:Landroid/graphics/Paint;

    sget-object v2, Landroid/graphics/Paint$Style;->FILL:Landroid/graphics/Paint$Style;

    invoke-virtual {v1, v2}, Landroid/graphics/Paint;->setStyle(Landroid/graphics/Paint$Style;)V

    .line 119
    iget-object v1, p0, Lcom/zuimeia/ui/rippleview/RippleView;->paint:Landroid/graphics/Paint;

    iget v2, p0, Lcom/zuimeia/ui/rippleview/RippleView;->rippleColor:I

    invoke-virtual {v1, v2}, Landroid/graphics/Paint;->setColor(I)V

    .line 120
    iget-object v1, p0, Lcom/zuimeia/ui/rippleview/RippleView;->paint:Landroid/graphics/Paint;

    iget v2, p0, Lcom/zuimeia/ui/rippleview/RippleView;->PAINT_ALPHA:I

    invoke-virtual {v1, v2}, Landroid/graphics/Paint;->setAlpha(I)V

    .line 121
    invoke-virtual {p0, v3}, Lcom/zuimeia/ui/rippleview/RippleView;->setWillNotDraw(Z)V

    .line 123
    new-instance v1, Landroid/view/GestureDetector;

    new-instance v2, Lcom/zuimeia/ui/rippleview/RippleView$2;

    invoke-direct {v2, p0}, Lcom/zuimeia/ui/rippleview/RippleView$2;-><init>(Lcom/zuimeia/ui/rippleview/RippleView;)V

    invoke-direct {v1, p1, v2}, Landroid/view/GestureDetector;-><init>(Landroid/content/Context;Landroid/view/GestureDetector$OnGestureListener;)V

    iput-object v1, p0, Lcom/zuimeia/ui/rippleview/RippleView;->gestureDetector:Landroid/view/GestureDetector;

    .line 135
    invoke-virtual {p0, v4}, Lcom/zuimeia/ui/rippleview/RippleView;->setDrawingCacheEnabled(Z)V

    goto/16 :goto_8
.end method


# virtual methods
.method public addView(Landroid/view/View;ILandroid/view/ViewGroup$LayoutParams;)V
    .registers 4
    .param p1, "child"    # Landroid/view/View;
    .param p2, "index"    # I
    .param p3, "params"    # Landroid/view/ViewGroup$LayoutParams;

    .prologue
    .line 140
    iput-object p1, p0, Lcom/zuimeia/ui/rippleview/RippleView;->childView:Landroid/view/View;

    .line 141
    invoke-super {p0, p1, p2, p3}, Landroid/widget/RelativeLayout;->addView(Landroid/view/View;ILandroid/view/ViewGroup$LayoutParams;)V

    .line 142
    return-void
.end method

.method public draw(Landroid/graphics/Canvas;)V
    .registers 11
    .param p1, "canvas"    # Landroid/graphics/Canvas;

    .prologue
    const/4 v8, 0x1

    const/4 v7, -0x1

    const/4 v6, 0x0

    const/4 v4, 0x0

    .line 146
    invoke-super {p0, p1}, Landroid/widget/RelativeLayout;->draw(Landroid/graphics/Canvas;)V

    .line 147
    iget-boolean v1, p0, Lcom/zuimeia/ui/rippleview/RippleView;->animationRunning:Z

    if-eqz v1, :cond_22

    .line 148
    iget v1, p0, Lcom/zuimeia/ui/rippleview/RippleView;->DURATION:I

    iget v2, p0, Lcom/zuimeia/ui/rippleview/RippleView;->timer:I

    iget v3, p0, Lcom/zuimeia/ui/rippleview/RippleView;->FRAME_RATE:I

    mul-int/2addr v2, v3

    if-gt v1, v2, :cond_23

    .line 149
    iput-boolean v4, p0, Lcom/zuimeia/ui/rippleview/RippleView;->animationRunning:Z

    .line 150
    iput v4, p0, Lcom/zuimeia/ui/rippleview/RippleView;->timer:I

    .line 151
    iput v7, p0, Lcom/zuimeia/ui/rippleview/RippleView;->durationEmpty:I

    .line 152
    iput v4, p0, Lcom/zuimeia/ui/rippleview/RippleView;->timerEmpty:I

    .line 153
    invoke-virtual {p1}, Landroid/graphics/Canvas;->restore()V

    .line 154
    invoke-virtual {p0}, Lcom/zuimeia/ui/rippleview/RippleView;->invalidate()V

    .line 188
    :cond_22
    :goto_22
    return-void

    .line 157
    :cond_23
    iget-object v1, p0, Lcom/zuimeia/ui/rippleview/RippleView;->canvasHandler:Landroid/os/Handler;

    iget-object v2, p0, Lcom/zuimeia/ui/rippleview/RippleView;->runnable:Ljava/lang/Runnable;

    iget v3, p0, Lcom/zuimeia/ui/rippleview/RippleView;->FRAME_RATE:I

    int-to-long v4, v3

    invoke-virtual {v1, v2, v4, v5}, Landroid/os/Handler;->postDelayed(Ljava/lang/Runnable;J)Z

    .line 159
    iget v1, p0, Lcom/zuimeia/ui/rippleview/RippleView;->timer:I

    if-nez v1, :cond_34

    .line 160
    invoke-virtual {p1}, Landroid/graphics/Canvas;->save()I

    .line 162
    :cond_34
    iget v1, p0, Lcom/zuimeia/ui/rippleview/RippleView;->x:F

    iget v2, p0, Lcom/zuimeia/ui/rippleview/RippleView;->y:F

    iget v3, p0, Lcom/zuimeia/ui/rippleview/RippleView;->radiusMax:F

    iget v4, p0, Lcom/zuimeia/ui/rippleview/RippleView;->timer:I

    int-to-float v4, v4

    iget v5, p0, Lcom/zuimeia/ui/rippleview/RippleView;->FRAME_RATE:I

    int-to-float v5, v5

    mul-float/2addr v4, v5

    iget v5, p0, Lcom/zuimeia/ui/rippleview/RippleView;->DURATION:I

    int-to-float v5, v5

    div-float/2addr v4, v5

    mul-float/2addr v3, v4

    iget-object v4, p0, Lcom/zuimeia/ui/rippleview/RippleView;->paint:Landroid/graphics/Paint;

    invoke-virtual {p1, v1, v2, v3, v4}, Landroid/graphics/Canvas;->drawCircle(FFFLandroid/graphics/Paint;)V

    .line 164
    iget-object v1, p0, Lcom/zuimeia/ui/rippleview/RippleView;->paint:Landroid/graphics/Paint;

    invoke-virtual {p0}, Lcom/zuimeia/ui/rippleview/RippleView;->getResources()Landroid/content/res/Resources;

    move-result-object v2

    const v3, 0x1060016

    invoke-virtual {v2, v3}, Landroid/content/res/Resources;->getColor(I)I

    move-result v2

    invoke-virtual {v1, v2}, Landroid/graphics/Paint;->setColor(I)V

    .line 166
    iget-object v1, p0, Lcom/zuimeia/ui/rippleview/RippleView;->rippleType:Ljava/lang/Integer;

    invoke-virtual {v1}, Ljava/lang/Integer;->intValue()I

    move-result v1

    if-ne v1, v8, :cond_a8

    iget-object v1, p0, Lcom/zuimeia/ui/rippleview/RippleView;->originBitmap:Landroid/graphics/Bitmap;

    if-eqz v1, :cond_a8

    iget v1, p0, Lcom/zuimeia/ui/rippleview/RippleView;->timer:I

    int-to-float v1, v1

    iget v2, p0, Lcom/zuimeia/ui/rippleview/RippleView;->FRAME_RATE:I

    int-to-float v2, v2

    mul-float/2addr v1, v2

    iget v2, p0, Lcom/zuimeia/ui/rippleview/RippleView;->DURATION:I

    int-to-float v2, v2

    div-float/2addr v1, v2

    const v2, 0x3ecccccd

    cmpl-float v1, v1, v2

    if-lez v1, :cond_a8

    .line 167
    iget v1, p0, Lcom/zuimeia/ui/rippleview/RippleView;->durationEmpty:I

    if-ne v1, v7, :cond_87

    .line 168
    iget v1, p0, Lcom/zuimeia/ui/rippleview/RippleView;->DURATION:I

    iget v2, p0, Lcom/zuimeia/ui/rippleview/RippleView;->timer:I

    iget v3, p0, Lcom/zuimeia/ui/rippleview/RippleView;->FRAME_RATE:I

    mul-int/2addr v2, v3

    sub-int/2addr v1, v2

    iput v1, p0, Lcom/zuimeia/ui/rippleview/RippleView;->durationEmpty:I

    .line 170
    :cond_87
    iget v1, p0, Lcom/zuimeia/ui/rippleview/RippleView;->timerEmpty:I

    add-int/lit8 v1, v1, 0x1

    iput v1, p0, Lcom/zuimeia/ui/rippleview/RippleView;->timerEmpty:I

    .line 171
    iget v1, p0, Lcom/zuimeia/ui/rippleview/RippleView;->radiusMax:F

    iget v2, p0, Lcom/zuimeia/ui/rippleview/RippleView;->timerEmpty:I

    int-to-float v2, v2

    iget v3, p0, Lcom/zuimeia/ui/rippleview/RippleView;->FRAME_RATE:I

    int-to-float v3, v3

    mul-float/2addr v2, v3

    iget v3, p0, Lcom/zuimeia/ui/rippleview/RippleView;->durationEmpty:I

    int-to-float v3, v3

    div-float/2addr v2, v3

    mul-float/2addr v1, v2

    float-to-int v1, v1

    invoke-direct {p0, v1}, Lcom/zuimeia/ui/rippleview/RippleView;->getCircleBitmap(I)Landroid/graphics/Bitmap;

    move-result-object v0

    .line 172
    .local v0, "tmpBitmap":Landroid/graphics/Bitmap;
    iget-object v1, p0, Lcom/zuimeia/ui/rippleview/RippleView;->paint:Landroid/graphics/Paint;

    invoke-virtual {p1, v0, v6, v6, v1}, Landroid/graphics/Canvas;->drawBitmap(Landroid/graphics/Bitmap;FFLandroid/graphics/Paint;)V

    .line 173
    invoke-virtual {v0}, Landroid/graphics/Bitmap;->recycle()V

    .line 176
    .end local v0    # "tmpBitmap":Landroid/graphics/Bitmap;
    :cond_a8
    iget-object v1, p0, Lcom/zuimeia/ui/rippleview/RippleView;->paint:Landroid/graphics/Paint;

    iget v2, p0, Lcom/zuimeia/ui/rippleview/RippleView;->rippleColor:I

    invoke-virtual {v1, v2}, Landroid/graphics/Paint;->setColor(I)V

    .line 178
    iget-object v1, p0, Lcom/zuimeia/ui/rippleview/RippleView;->rippleType:Ljava/lang/Integer;

    invoke-virtual {v1}, Ljava/lang/Integer;->intValue()I

    move-result v1

    if-ne v1, v8, :cond_f2

    .line 179
    iget v1, p0, Lcom/zuimeia/ui/rippleview/RippleView;->timer:I

    int-to-float v1, v1

    iget v2, p0, Lcom/zuimeia/ui/rippleview/RippleView;->FRAME_RATE:I

    int-to-float v2, v2

    mul-float/2addr v1, v2

    iget v2, p0, Lcom/zuimeia/ui/rippleview/RippleView;->DURATION:I

    int-to-float v2, v2

    div-float/2addr v1, v2

    const v2, 0x3f19999a

    cmpl-float v1, v1, v2

    if-lez v1, :cond_ea

    .line 180
    iget-object v1, p0, Lcom/zuimeia/ui/rippleview/RippleView;->paint:Landroid/graphics/Paint;

    iget v2, p0, Lcom/zuimeia/ui/rippleview/RippleView;->PAINT_ALPHA:I

    int-to-float v2, v2

    iget v3, p0, Lcom/zuimeia/ui/rippleview/RippleView;->PAINT_ALPHA:I

    int-to-float v3, v3

    iget v4, p0, Lcom/zuimeia/ui/rippleview/RippleView;->timerEmpty:I

    int-to-float v4, v4

    iget v5, p0, Lcom/zuimeia/ui/rippleview/RippleView;->FRAME_RATE:I

    int-to-float v5, v5

    mul-float/2addr v4, v5

    iget v5, p0, Lcom/zuimeia/ui/rippleview/RippleView;->durationEmpty:I

    int-to-float v5, v5

    div-float/2addr v4, v5

    mul-float/2addr v3, v4

    sub-float/2addr v2, v3

    float-to-int v2, v2

    invoke-virtual {v1, v2}, Landroid/graphics/Paint;->setAlpha(I)V

    .line 186
    :goto_e2
    iget v1, p0, Lcom/zuimeia/ui/rippleview/RippleView;->timer:I

    add-int/lit8 v1, v1, 0x1

    iput v1, p0, Lcom/zuimeia/ui/rippleview/RippleView;->timer:I

    goto/16 :goto_22

    .line 182
    :cond_ea
    iget-object v1, p0, Lcom/zuimeia/ui/rippleview/RippleView;->paint:Landroid/graphics/Paint;

    iget v2, p0, Lcom/zuimeia/ui/rippleview/RippleView;->PAINT_ALPHA:I

    invoke-virtual {v1, v2}, Landroid/graphics/Paint;->setAlpha(I)V

    goto :goto_e2

    .line 184
    :cond_f2
    iget-object v1, p0, Lcom/zuimeia/ui/rippleview/RippleView;->paint:Landroid/graphics/Paint;

    iget v2, p0, Lcom/zuimeia/ui/rippleview/RippleView;->PAINT_ALPHA:I

    int-to-float v2, v2

    iget v3, p0, Lcom/zuimeia/ui/rippleview/RippleView;->PAINT_ALPHA:I

    int-to-float v3, v3

    iget v4, p0, Lcom/zuimeia/ui/rippleview/RippleView;->timer:I

    int-to-float v4, v4

    iget v5, p0, Lcom/zuimeia/ui/rippleview/RippleView;->FRAME_RATE:I

    int-to-float v5, v5

    mul-float/2addr v4, v5

    iget v5, p0, Lcom/zuimeia/ui/rippleview/RippleView;->DURATION:I

    int-to-float v5, v5

    div-float/2addr v4, v5

    mul-float/2addr v3, v4

    sub-float/2addr v2, v3

    float-to-int v2, v2

    invoke-virtual {v1, v2}, Landroid/graphics/Paint;->setAlpha(I)V

    goto :goto_e2
.end method

.method public onInterceptTouchEvent(Landroid/view/MotionEvent;)Z
    .registers 3
    .param p1, "event"    # Landroid/view/MotionEvent;

    .prologue
    .line 239
    const/4 v0, 0x1

    return v0
.end method

.method protected onSizeChanged(IIII)V
    .registers 12
    .param p1, "w"    # I
    .param p2, "h"    # I
    .param p3, "oldw"    # I
    .param p4, "oldh"    # I

    .prologue
    const/high16 v1, 0x3f800000

    .line 192
    invoke-super {p0, p1, p2, p3, p4}, Landroid/widget/RelativeLayout;->onSizeChanged(IIII)V

    .line 193
    iput p1, p0, Lcom/zuimeia/ui/rippleview/RippleView;->WIDTH:I

    .line 194
    iput p2, p0, Lcom/zuimeia/ui/rippleview/RippleView;->HEIGHT:I

    .line 196
    new-instance v0, Landroid/view/animation/ScaleAnimation;

    iget v2, p0, Lcom/zuimeia/ui/rippleview/RippleView;->zoomScale:F

    iget v4, p0, Lcom/zuimeia/ui/rippleview/RippleView;->zoomScale:F

    div-int/lit8 v3, p1, 0x2

    int-to-float v5, v3

    div-int/lit8 v3, p2, 0x2

    int-to-float v6, v3

    move v3, v1

    invoke-direct/range {v0 .. v6}, Landroid/view/animation/ScaleAnimation;-><init>(FFFFFF)V

    iput-object v0, p0, Lcom/zuimeia/ui/rippleview/RippleView;->scaleAnimation:Landroid/view/animation/ScaleAnimation;

    .line 197
    const-string v0, ""

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, "scaleAnimation==="

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    iget v2, p0, Lcom/zuimeia/ui/rippleview/RippleView;->zoomDuration:I

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-static {v0, v1}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I

    .line 198
    iget-object v0, p0, Lcom/zuimeia/ui/rippleview/RippleView;->scaleAnimation:Landroid/view/animation/ScaleAnimation;

    iget v1, p0, Lcom/zuimeia/ui/rippleview/RippleView;->zoomDuration:I

    int-to-long v2, v1

    invoke-virtual {v0, v2, v3}, Landroid/view/animation/ScaleAnimation;->setDuration(J)V

    .line 199
    iget-object v0, p0, Lcom/zuimeia/ui/rippleview/RippleView;->scaleAnimation:Landroid/view/animation/ScaleAnimation;

    const/4 v1, 0x2

    invoke-virtual {v0, v1}, Landroid/view/animation/ScaleAnimation;->setRepeatMode(I)V

    .line 200
    iget-object v0, p0, Lcom/zuimeia/ui/rippleview/RippleView;->scaleAnimation:Landroid/view/animation/ScaleAnimation;

    const/4 v1, 0x1

    invoke-virtual {v0, v1}, Landroid/view/animation/ScaleAnimation;->setRepeatCount(I)V

    .line 201
    return-void
.end method

.method public onTouchEvent(Landroid/view/MotionEvent;)Z
    .registers 5
    .param p1, "event"    # Landroid/view/MotionEvent;

    .prologue
    const/4 v2, 0x1

    .line 205
    iget-object v0, p0, Lcom/zuimeia/ui/rippleview/RippleView;->gestureDetector:Landroid/view/GestureDetector;

    invoke-virtual {v0, p1}, Landroid/view/GestureDetector;->onTouchEvent(Landroid/view/MotionEvent;)Z

    move-result v0

    if-eqz v0, :cond_79

    iget-boolean v0, p0, Lcom/zuimeia/ui/rippleview/RippleView;->animationRunning:Z

    if-nez v0, :cond_79

    .line 206
    iget-object v0, p0, Lcom/zuimeia/ui/rippleview/RippleView;->hasToZoom:Ljava/lang/Boolean;

    invoke-virtual {v0}, Ljava/lang/Boolean;->booleanValue()Z

    move-result v0

    if-eqz v0, :cond_1a

    .line 207
    iget-object v0, p0, Lcom/zuimeia/ui/rippleview/RippleView;->scaleAnimation:Landroid/view/animation/ScaleAnimation;

    invoke-virtual {p0, v0}, Lcom/zuimeia/ui/rippleview/RippleView;->startAnimation(Landroid/view/animation/Animation;)V

    .line 209
    :cond_1a
    iget v0, p0, Lcom/zuimeia/ui/rippleview/RippleView;->WIDTH:I

    iget v1, p0, Lcom/zuimeia/ui/rippleview/RippleView;->HEIGHT:I

    invoke-static {v0, v1}, Ljava/lang/Math;->max(II)I

    move-result v0

    int-to-float v0, v0

    iput v0, p0, Lcom/zuimeia/ui/rippleview/RippleView;->radiusMax:F

    .line 211
    iget-object v0, p0, Lcom/zuimeia/ui/rippleview/RippleView;->rippleType:Ljava/lang/Integer;

    invoke-virtual {v0}, Ljava/lang/Integer;->intValue()I

    move-result v0

    const/4 v1, 0x2

    if-eq v0, v1, :cond_35

    .line 212
    iget v0, p0, Lcom/zuimeia/ui/rippleview/RippleView;->radiusMax:F

    const/high16 v1, 0x40000000

    div-float/2addr v0, v1

    iput v0, p0, Lcom/zuimeia/ui/rippleview/RippleView;->radiusMax:F

    .line 214
    :cond_35
    iget v0, p0, Lcom/zuimeia/ui/rippleview/RippleView;->radiusMax:F

    iget v1, p0, Lcom/zuimeia/ui/rippleview/RippleView;->ripplePadding:I

    int-to-float v1, v1

    sub-float/2addr v0, v1

    iput v0, p0, Lcom/zuimeia/ui/rippleview/RippleView;->radiusMax:F

    .line 216
    iget-object v0, p0, Lcom/zuimeia/ui/rippleview/RippleView;->isCentered:Ljava/lang/Boolean;

    invoke-virtual {v0}, Ljava/lang/Boolean;->booleanValue()Z

    move-result v0

    if-nez v0, :cond_4d

    iget-object v0, p0, Lcom/zuimeia/ui/rippleview/RippleView;->rippleType:Ljava/lang/Integer;

    invoke-virtual {v0}, Ljava/lang/Integer;->intValue()I

    move-result v0

    if-ne v0, v2, :cond_7f

    .line 217
    :cond_4d
    invoke-virtual {p0}, Lcom/zuimeia/ui/rippleview/RippleView;->getMeasuredWidth()I

    move-result v0

    div-int/lit8 v0, v0, 0x2

    int-to-float v0, v0

    iput v0, p0, Lcom/zuimeia/ui/rippleview/RippleView;->x:F

    .line 218
    invoke-virtual {p0}, Lcom/zuimeia/ui/rippleview/RippleView;->getMeasuredHeight()I

    move-result v0

    div-int/lit8 v0, v0, 0x2

    int-to-float v0, v0

    iput v0, p0, Lcom/zuimeia/ui/rippleview/RippleView;->y:F

    .line 224
    :goto_5f
    iput-boolean v2, p0, Lcom/zuimeia/ui/rippleview/RippleView;->animationRunning:Z

    .line 226
    iget-object v0, p0, Lcom/zuimeia/ui/rippleview/RippleView;->rippleType:Ljava/lang/Integer;

    invoke-virtual {v0}, Ljava/lang/Integer;->intValue()I

    move-result v0

    if-ne v0, v2, :cond_73

    iget-object v0, p0, Lcom/zuimeia/ui/rippleview/RippleView;->originBitmap:Landroid/graphics/Bitmap;

    if-nez v0, :cond_73

    .line 227
    invoke-virtual {p0, v2}, Lcom/zuimeia/ui/rippleview/RippleView;->getDrawingCache(Z)Landroid/graphics/Bitmap;

    move-result-object v0

    iput-object v0, p0, Lcom/zuimeia/ui/rippleview/RippleView;->originBitmap:Landroid/graphics/Bitmap;

    .line 229
    :cond_73
    invoke-virtual {p0}, Lcom/zuimeia/ui/rippleview/RippleView;->invalidate()V

    .line 230
    invoke-virtual {p0}, Lcom/zuimeia/ui/rippleview/RippleView;->performClick()Z

    .line 233
    :cond_79
    iget-object v0, p0, Lcom/zuimeia/ui/rippleview/RippleView;->childView:Landroid/view/View;

    invoke-virtual {v0, p1}, Landroid/view/View;->onTouchEvent(Landroid/view/MotionEvent;)Z

    .line 234
    return v2

    .line 220
    :cond_7f
    invoke-virtual {p1}, Landroid/view/MotionEvent;->getX()F

    move-result v0

    iput v0, p0, Lcom/zuimeia/ui/rippleview/RippleView;->x:F

    .line 221
    invoke-virtual {p1}, Landroid/view/MotionEvent;->getY()F

    move-result v0

    iput v0, p0, Lcom/zuimeia/ui/rippleview/RippleView;->y:F

    goto :goto_5f
.end method
